package com.yupi.dianzan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.dianzan.model.dto.thumb.DoThumbRequest;
import com.yupi.dianzan.model.entity.Thumb;
import jakarta.servlet.http.HttpServletRequest;

public interface ThumbService extends IService<Thumb> {

    /**
     * 点赞
     *
     * @param doThumbRequest 参数
     * @param request        登陆信息
     * @return {@link Boolean }
     */
    Boolean doThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);

    /**
     * 取消点赞
     * @param doThumbRequest    参数
     * @param request   登陆信息
     * @return {@link Boolean }
     */
    Boolean undoThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);

    /**
     * 判断用户是否点赞
     * @param blogId 博客id
     * @param userId 用户id
     * @return {@link Boolean }
     */
    Boolean hasThumb(Long blogId, Long userId);
}
